{include file="public/header" /}
<body>
<div class="x-body layui-anim">
    <form class="layui-form" id="form" action="{:url('save')}">
        <input type="hidden" id="id" name="id" value="{$Request.param.id}">
        {include file="public/arguments" /}
        <div class="layui-form-item">
            <label class="layui-form-label">商品名称</label>
            <div class="layui-input-block">
                <input type="text" name="title" lay-verify="required" lay-reqtext="请填写线索名称" placeholder="请填写线索名称" class="layui-input" value="{$info?$info.title:''}"/>
            </div>
        </div>

        <div class="layui-form-item sunSelect" data-url="{:url('ProductCate/getCate')}" data-value="id" data-name="title">
            <label class="layui-form-label">商品分类</label>
            <div class="layui-input-inline">
                <select name="cate_1" data-name="商品分类" lay-verify="required" lay-reqtext="请选择商品分类" data-id="{$info?$info.cate_1:''}" lay-filter="sunSelect"></select>
            </div>
        </div>


        <div class="layui-form-item" >
            <label class="layui-form-label">价格</label>
            <div class="layui-input-inline">
                <input type="text" name="price"  lay-reqtext="价格" placeholder="价格"
                       class="layui-input" value="{$info?$info.price:''}"
                       onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')">
            </div>
            <div class="layui-form-mid layui-word-aux">元</div>
        </div>

<!--        <div class="layui-form-item" >-->
<!--            <label class="layui-form-label">会员价格</label>-->
<!--            <div class="layui-input-inline">-->
<!--                <input type="text" name="vip_price"  lay-reqtext="会员价格" placeholder="会员价格"-->
<!--                       class="layui-input" value="{$info?$info.vip_price:''}"-->
<!--                       onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')">-->
<!--            </div>-->
<!--            <div class="layui-form-mid layui-word-aux">元</div>-->
<!--        </div>-->


        <div class="layui-form-item" >
            <label class="layui-form-label">库存</label>
            <div class="layui-input-inline">
                <input type="text" name="stock"  lay-reqtext="库存" placeholder="库存"
                       class="layui-input" value="{$info?$info.stock:''}"
                       onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')">
            </div>
            <div class="layui-form-mid layui-word-aux">个</div>
        </div>

       {include file="form/items/img" type='' /}

<!--        <script id="openMaterialTemplate" type="text/html">-->
<!--            {{# for(var i=0;i<d.data.length ;i++){ }}-->
<!--            <div class="material-preview">-->
<!--                <div class="del-wrap" >-->
<!--                    <div>-->
<!--                        <div class="file-item relative" style="height: 100px; width: 100px;">-->
<!--                            <div class="el-image image">-->
<!--                                <img src="{{d.data[i]}}" class="el-image__inner" style="object-fit: contain;">-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                    <div class="icon-close">-->
<!--                        <i class="el-icon layui-icon layui-icon-close" style="font-size: 12px; &#45;&#45;color: inherit;"></i>-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="operation-btns text-xs text-center">-->
<!--                    <span class="openMaterialPreview" data-url="{{d.data[i]}}">查看</span>-->
<!--                </div>-->
<!--            </div>-->
<!--            {{# } }}-->
<!--            <input type="hidden" name="{{d.name}}" value="{{(d.data).join(',')}}"/>-->
<!--        </script>-->

        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-inline">
                <input type="text" name="sort" autocomplete="off" placeholder="请输入排序，越小越靠前" class="layui-input"
                       value="{$info?$info.sort:''}">
            </div>
        </div>




        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">详情</label>
            <div class="layui-input-block">
                <div data-filed="content" id="editor—wrapper" class="wang-editor editor—wrapper"
                     data-value='<?php echo isset($info)?$info['content']:"";?>'>
                    <input type="hidden" class="editor—content" name="content" value=''/>
                    <div class="toolbar-container" id="toolbar-container-content"><!-- 工具栏 --></div>
                    <div class="editor-container" id="editor-container-content"><!-- 编辑器 --></div>
                </div>
            </div>
        </div>

        <div class="layui-form-item" style="text-align: center;">
            <button class="layui-btn" lay-filter="save" lay-submit formObj="#form">保存</button>
        </div>

    </form>
</div>
</body>
{include file="public/footer" /}

</html>